home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / Small Demos / tak.icl < prev    next >
Encoding:
Text File  |  1997-06-20  |  419 b   |  22 lines  |  [TEXT/3PRM]

  1. module tak
  2.  
  3. /*
  4. The Takeuchi function.
  5.  
  6. To generate an application for this program the Clean 0.8
  7. application should be set to at least 1.1 Mb. To launch the
  8. generated application another 150K of free memory is needed.
  9. */
  10.  
  11. import StdClass; // RWS
  12. import StdInt
  13.  
  14. Tak::Int Int Int -> Int
  15. Tak x y    z | x<=y    =  z
  16.                     =  Tak    (Tak (dec x) y z)
  17.                             (Tak (dec y) z x)
  18.                             (Tak (dec z) x y)
  19.  
  20. Start::Int
  21. Start = Tak 24 16 8
  22.